import fetch from '@/utils/fetch'

export function getBuildingList(areaId, params) {
	return fetch({
	    url: '/uc/v1/mgt/building',
	    method: 'get',
		headers: {'x-area-id': areaId},
	    params
  	})
}

export function getBuildingDetail(id) {
	return fetch({
	    url: `/uc/v1/mgt/building/${id}`,
	    method: 'get'
  	})
}

export function createBuilding(data) {
	return fetch({
		url: '/uc/v1/mgt/building',
		method: 'post',
		data
	})
}

export function modifyBuilding(id, data) {
	return fetch({
	    url: `/uc/v1/mgt/building/${id}`,
	    method: 'patch',
	    data
	})
}